<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8"><link rel="icon" href="img/icon.jpg">
    <meta name="易农" content="width=device-width, initial-scale=1">
    <script src="https://code.highcharts.com.cn/highcharts/highcharts.js"></script>
</head>
    <link rel="stylesheet" type="text/css" href="css/index.css">
<body>
<header class="head">
    <h3 class="head_button" ><a href="/">首页</a></h3>
    <h3 class="head_button"><a href="/hurt">小麦病虫害</a></h3>
    <h3 class="head_button" ><a  href="/mostLike_addr">最受欢迎农产品价格比较</a></h3>
    <h3 class="head_button" ><a  style="background-color: gray" href="/line">农业总产值预测</a></h3>
    <h3 class="head_button" ><a href="/line_product">历史农产品价格</a></h3>
</header>
<section class="section">
    <div id="container" style="max-width:800px;height:400px"></div>
</section>
<script>
    var chart = Highcharts.chart('container', {
        title: {
            text: '1999 ~ 2030 年农业总产值预测-折线图'
        },
        // subtitle: {
        //     text: '数据来源：www.sdaeu.edu.cn'
        // },
        yAxis: {
            title: {
                text: '农业总产值'
            }
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle'
        },
        plotOptions: {
            series: {
                label: {
                    connectorAllowed: false
                },
                pointStart: 1999
            }
        },
        series: [{
            name: '预测曲线',
            data: [248.44, 287.12, 329.80, 382.52, 443.72, 506.90, 620.96, 731.63,
                889.97,1075.90,1228.97,1456.42,1763.57, 2022.07,2276.49,2540.70,
                2828.51,3092.60,3272.50,3598.33,3917.55,
                count(2020),count(2021),count(2022),count(2023),count(2024),count(2025),count(2026),
                count(2027),count(2028),count(2029),count(2030),
            ]
        }
        // , {
        //     name: '物料',
        //     data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
        // }
        ],
        responsive: {
            rules: [{
                condition: {
                    maxWidth: 500
                },
                chartOptions: {
                    legend: {
                        layout: 'horizontal',
                        align: 'center',
                        verticalAlign: 'bottom'
                    }
                }
            }]
        }
    });
    function count(year) {
        return 189.74*(year-1990) - 491.25;
    }
</script>
</body>
</html>